Integrand size = 39, antiderivative size = 141 \[ \int \frac {\cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=-\frac {(3 A-B) x}{a^3}+\frac {2 (36 A-11 B+C) \sin (c+d x)}{15 a^3 d}-\frac {(A-B+C) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(9 A-4 B-C) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}-\frac {(3 A-B) \sin (c+d x)}{d \left (a^3+a^3 \sec (c+d x)\right )} \]
[Out]
Time = 0.48 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.128, Rules used = {4169, 4105, 3872, 2717, 8} \[ \int \frac {\cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {2 (36 A-11 B+C) \sin (c+d x)}{15 a^3 d}-\frac {(3 A-B) \sin (c+d x)}{d \left (a^3 \sec (c+d x)+a^3\right )}-\frac {x (3 A-B)}{a^3}-\frac {(9 A-4 B-C) \sin (c+d x)}{15 a d (a \sec (c+d x)+a)^2}-\frac {(A-B+C) \sin (c+d x)}{5 d (a \sec (c+d x)+a)^3} \]
[In]
[Out]
Rule 8
Rule 2717
Rule 3872
Rule 4105
Rule 4169
Rubi steps \begin{align*} \text {integral}& = -\frac {(A-B+C) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}+\frac {\int \frac {\cos (c+d x) (a (6 A-B+C)-a (3 A-3 B-2 C) \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx}{5 a^2} \\ & = -\frac {(A-B+C) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(9 A-4 B-C) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}+\frac {\int \frac {\cos (c+d x) \left (a^2 (27 A-7 B+2 C)-2 a^2 (9 A-4 B-C) \sec (c+d x)\right )}{a+a \sec (c+d x)} \, dx}{15 a^4} \\ & = -\frac {(A-B+C) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(9 A-4 B-C) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}-\frac {(3 A-B) \sin (c+d x)}{d \left (a^3+a^3 \sec (c+d x)\right )}+\frac {\int \cos (c+d x) \left (2 a^3 (36 A-11 B+C)-15 a^3 (3 A-B) \sec (c+d x)\right ) \, dx}{15 a^6} \\ & = -\frac {(A-B+C) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(9 A-4 B-C) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}-\frac {(3 A-B) \sin (c+d x)}{d \left (a^3+a^3 \sec (c+d x)\right )}-\frac {(3 A-B) \int 1 \, dx}{a^3}+\frac {(2 (36 A-11 B+C)) \int \cos (c+d x) \, dx}{15 a^3} \\ & = -\frac {(3 A-B) x}{a^3}+\frac {2 (36 A-11 B+C) \sin (c+d x)}{15 a^3 d}-\frac {(A-B+C) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(9 A-4 B-C) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}-\frac {(3 A-B) \sin (c+d x)}{d \left (a^3+a^3 \sec (c+d x)\right )} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(419\) vs. \(2(141)=282\).
Time = 3.85 (sec) , antiderivative size = 419, normalized size of antiderivative = 2.97 \[ \int \frac {\cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {\sec \left (\frac {c}{2}\right ) \sec ^5\left (\frac {1}{2} (c+d x)\right ) \left (-300 (3 A-B) d x \cos \left (\frac {d x}{2}\right )-300 (3 A-B) d x \cos \left (c+\frac {d x}{2}\right )-450 A d x \cos \left (c+\frac {3 d x}{2}\right )+150 B d x \cos \left (c+\frac {3 d x}{2}\right )-450 A d x \cos \left (2 c+\frac {3 d x}{2}\right )+150 B d x \cos \left (2 c+\frac {3 d x}{2}\right )-90 A d x \cos \left (2 c+\frac {5 d x}{2}\right )+30 B d x \cos \left (2 c+\frac {5 d x}{2}\right )-90 A d x \cos \left (3 c+\frac {5 d x}{2}\right )+30 B d x \cos \left (3 c+\frac {5 d x}{2}\right )+1755 A \sin \left (\frac {d x}{2}\right )-740 B \sin \left (\frac {d x}{2}\right )+160 C \sin \left (\frac {d x}{2}\right )-1125 A \sin \left (c+\frac {d x}{2}\right )+540 B \sin \left (c+\frac {d x}{2}\right )-120 C \sin \left (c+\frac {d x}{2}\right )+1215 A \sin \left (c+\frac {3 d x}{2}\right )-460 B \sin \left (c+\frac {3 d x}{2}\right )+80 C \sin \left (c+\frac {3 d x}{2}\right )-225 A \sin \left (2 c+\frac {3 d x}{2}\right )+180 B \sin \left (2 c+\frac {3 d x}{2}\right )-60 C \sin \left (2 c+\frac {3 d x}{2}\right )+363 A \sin \left (2 c+\frac {5 d x}{2}\right )-128 B \sin \left (2 c+\frac {5 d x}{2}\right )+28 C \sin \left (2 c+\frac {5 d x}{2}\right )+75 A \sin \left (3 c+\frac {5 d x}{2}\right )+15 A \sin \left (3 c+\frac {7 d x}{2}\right )+15 A \sin \left (4 c+\frac {7 d x}{2}\right )\right )}{960 a^3 d} \]
[In]
[Out]
Time = 0.25 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.71
method | result | size |
parallelrisch | \(\frac {\left (\frac {2 \left (39 A -\frac {32 B}{3}+\frac {7 C}{3}\right ) \cos \left (2 d x +2 c \right )}{5}+A \cos \left (3 d x +3 c \right )+\frac {\left (243 A -68 B +8 C \right ) \cos \left (d x +c \right )}{5}+\frac {174 A}{5}-\frac {152 B}{15}+\frac {22 C}{15}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-48 x \left (A -\frac {B}{3}\right ) d}{16 a^{3} d}\) | \(100\) |
derivativedivides | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} A}{5}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} B}{5}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} C}{5}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} A +\frac {4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}-\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} C}{3}+17 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A -7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C +\frac {8 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}-8 \left (3 A -B \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{3}}\) | \(175\) |
default | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} A}{5}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} B}{5}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} C}{5}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} A +\frac {4 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}-\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} C}{3}+17 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A -7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C +\frac {8 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}-8 \left (3 A -B \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{3}}\) | \(175\) |
norman | \(\frac {\frac {\left (3 A -B \right ) x}{a}-\frac {\left (3 A -B \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{a}+\frac {\left (A -B +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{20 a d}-\frac {\left (3 A -2 B +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{6 a d}+\frac {\left (15 A -2 B +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{6 a d}-\frac {\left (25 A -7 B +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 a d}+\frac {\left (42 A -17 B +2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{10 a d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) a^{2}}\) | \(205\) |
risch | \(-\frac {3 A x}{a^{3}}+\frac {B x}{a^{3}}-\frac {i A \,{\mathrm e}^{i \left (d x +c \right )}}{2 a^{3} d}+\frac {i A \,{\mathrm e}^{-i \left (d x +c \right )}}{2 a^{3} d}+\frac {2 i \left (90 A \,{\mathrm e}^{4 i \left (d x +c \right )}-45 B \,{\mathrm e}^{4 i \left (d x +c \right )}+15 C \,{\mathrm e}^{4 i \left (d x +c \right )}+300 A \,{\mathrm e}^{3 i \left (d x +c \right )}-135 B \,{\mathrm e}^{3 i \left (d x +c \right )}+30 C \,{\mathrm e}^{3 i \left (d x +c \right )}+420 A \,{\mathrm e}^{2 i \left (d x +c \right )}-185 B \,{\mathrm e}^{2 i \left (d x +c \right )}+40 C \,{\mathrm e}^{2 i \left (d x +c \right )}+270 A \,{\mathrm e}^{i \left (d x +c \right )}-115 B \,{\mathrm e}^{i \left (d x +c \right )}+20 C \,{\mathrm e}^{i \left (d x +c \right )}+72 A -32 B +7 C \right )}{15 d \,a^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{5}}\) | \(229\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 182, normalized size of antiderivative = 1.29 \[ \int \frac {\cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=-\frac {15 \, {\left (3 \, A - B\right )} d x \cos \left (d x + c\right )^{3} + 45 \, {\left (3 \, A - B\right )} d x \cos \left (d x + c\right )^{2} + 45 \, {\left (3 \, A - B\right )} d x \cos \left (d x + c\right ) + 15 \, {\left (3 \, A - B\right )} d x - {\left (15 \, A \cos \left (d x + c\right )^{3} + {\left (117 \, A - 32 \, B + 7 \, C\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (57 \, A - 17 \, B + 2 \, C\right )} \cos \left (d x + c\right ) + 72 \, A - 22 \, B + 2 \, C\right )} \sin \left (d x + c\right )}{15 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \]
[In]
[Out]
\[ \int \frac {\cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {\int \frac {A \cos {\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx + \int \frac {B \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx + \int \frac {C \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx}{a^{3}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 295 vs. \(2 (135) = 270\).
Time = 0.31 (sec) , antiderivative size = 295, normalized size of antiderivative = 2.09 \[ \int \frac {\cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {3 \, A {\left (\frac {40 \, \sin \left (d x + c\right )}{{\left (a^{3} + \frac {a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} + \frac {\frac {85 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {10 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {\sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a^{3}} - \frac {120 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}}\right )} - B {\left (\frac {\frac {105 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {20 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a^{3}} - \frac {120 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}}\right )} + \frac {C {\left (\frac {15 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {10 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a^{3}}}{60 \, d} \]
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 206, normalized size of antiderivative = 1.46 \[ \int \frac {\cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=-\frac {\frac {60 \, {\left (d x + c\right )} {\left (3 \, A - B\right )}}{a^{3}} - \frac {120 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )} a^{3}} - \frac {3 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 30 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 20 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 10 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 255 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 105 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 15 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{15}}}{60 \, d} \]
[In]
[Out]
Time = 16.09 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.16 \[ \int \frac {\cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {3\,\left (A-B+C\right )}{4\,a^3}+\frac {4\,A-2\,B}{2\,a^3}+\frac {6\,A-2\,C}{4\,a^3}\right )}{d}-\frac {x\,\left (3\,A-B\right )}{a^3}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {A-B+C}{6\,a^3}+\frac {4\,A-2\,B}{12\,a^3}\right )}{d}+\frac {2\,A\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^3\right )}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (A-B+C\right )}{20\,a^3\,d} \]
[In]
[Out]